using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Net35.Xrm.Sdk.Metadata.Query
{
	[DataContract(Name = "MetadataConditionExpression", Namespace = "http://schemas.microsoft.com/xrm/2011/Metadata/Query"), KnownType("GetKnownConditionValueTypes")]
	public sealed class MetadataConditionExpression : IExtensibleDataObject
	{
		[DataMember]
		public string PropertyName
		{
			get;
			set;
		}
		[DataMember]
		public MetadataConditionOperator ConditionOperator
		{
			get;
			set;
		}
		[DataMember]
		public object Value
		{
			get;
			set;
		}
		public ExtensionDataObject ExtensionData
		{
			get;
			set;
		}
		public MetadataConditionExpression()
		{
		}
		public MetadataConditionExpression(string propertyName, MetadataConditionOperator conditionOperator, object value)
		{
			this.PropertyName = propertyName;
			this.ConditionOperator = conditionOperator;
			this.Value = value;
		}
		private static IEnumerable<Type> GetKnownConditionValueTypes()
		{
			return KnownTypesProvider.GetKnownMetadataEnumTypes();
		}
	}
}
